// icon图标
export const liulaing = "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/icon/liuliang.webp";
export const yanse = "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/icon/yanse.webp";
export const tongjing = "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/icon/tongjing.webp";
export const aiai = "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/icon/aiai.webp";
export const zhengzhuang = "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/icon/zhengzhuang.webp";
export const baidai = "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/icon/baidai.webp";
export const xinqing = "";

// 状态数组
export const commonColorList = [{
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/color-1.webp",
    label: "浅红色",
    value: "浅红色",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/color-2.webp",
    label: "鲜红色",
    value: "鲜红色",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/color-3.webp",
    label: "深红色",
    value: "深红色",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/color-4.webp",
    label: "褐色",
    value: "褐色",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/color-5.webp",
    label: "黑色",
    value: "黑色",
    selectd: false
}]

export const commonDysmenorrheaList = [{
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/dysmenorrhea-1.webp",
    label: "完全不痛",
    value: "完全不痛",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/dysmenorrhea-2.webp",
    label: "轻微痛",
    value: "轻微痛",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/dysmenorrhea-3.webp",
    label: "比较痛",
    value: "比较痛",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/dysmenorrhea-4.webp",
    label: "非常痛",
    value: "非常痛",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/dysmenorrhea-5.webp",
    label: "痛到极致",
    value: "痛到极致",
    selectd: false
}]

export const commonFlowList = [{
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/heavyMenstrual-1.webp",
    label: "非常少量",
    value: "非常少量",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/heavyMenstrual-2.webp",
    label: "少量",
    value: "少量",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/heavyMenstrual-3.webp",
    label: "中量",
    value: "中量",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/heavyMenstrual-4.webp",
    label: "大量",
    value: "大量",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/heavyMenstrual-5.webp",
    label: "非常大量",
    value: "非常大量",
    selectd: false
}]

export const commonHavingSexList = [{
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/havingSex-1.webp",
    label: "无措施",
    value: "无措施",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/havingSex-2.webp",
    label: "避孕套",
    value: "避孕套",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/havingSex-3.webp",
    label: "体外排精",
    value: "体外排精",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/havingSex-4.webp",
    label: "未射精",
    value: "未射精",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/havingSex-5.webp",
    label: "紧急避孕药",
    value: "紧急避孕药",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/havingSex-6.webp",
    label: "短效避孕药",
    value: "短效避孕药",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/havingSex-7.webp",
    label: "长效避孕药",
    value: "长效避孕药",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/havingSex-8.webp",
    label: "节孕环",
    value: "节孕环",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/havingSex-9.webp",
    label: "其他措施",
    value: "其他措施",
    selectd: false
}]

export const commonLeucorrheaList = [{
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/leucorrhea-1.webp",
    label: "干燥",
    value: "干燥",
    description: "内裤干燥、分泌物量少、无水分",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/leucorrhea-2.webp",
    label: "粘稠",
    value: "粘稠",
    description: "分泌物稠厚，触感像胶状物",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/leucorrhea-3.webp",
    label: "稀糊状",
    value: "稀糊状",
    description: "含水量偏多偏黄色、触感像乳液",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/leucorrhea-4.webp",
    label: "水状",
    value: "水状",
    description: "呈白色或透明，触感似水滴",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/leucorrhea-5.webp",
    label: "蛋清状",
    value: "蛋清状",
    description: "呈透明状，两指间可拉丝",
    selectd: false
}]

export const commonPhysicalSymptomsList = [{
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-1.webp",
    label: "腰酸",
    value: "腰酸",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-2.webp",
    label: "腹痛",
    value: "腹痛",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-3.webp",
    label: "小腹坠胀",
    value: "小腹坠胀",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-4.webp",
    label: "乳房胀痛",
    value: "乳房胀痛",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-5.webp",
    label: "身体酸痛",
    value: "身体酸痛",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-6.webp",
    label: "头痛",
    value: "头痛",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-7.webp",
    label: "眩晕",
    value: "眩晕",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-8.webp",
    label: "失眠",
    value: "失眠",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-9.webp",
    label: "粉刺",
    value: "粉刺",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-10.webp",
    label: "皮肤干燥",
    value: "皮肤干燥",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-11.webp",
    label: "食欲不振",
    value: "食欲不振",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-12.webp",
    label: "食欲旺盛",
    value: "食欲旺盛",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-13.webp",
    label: "贪冷饮",
    value: "贪冷饮",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-14.webp",
    label: "腹泻",
    value: "腹泻",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-15.webp",
    label: "便秘",
    value: "便秘",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/physicalSymptoms-16.webp",
    label: "疲惫",
    value: "疲惫",
    selectd: false
}]

export const commonVaginalDischargeList = [{
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/vaginalDischarge-1.webp",
    label: "褐色分泌物",
    value: "褐色分泌物",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/vaginalDischarge-2.webp",
    label: "出血",
    value: "出血",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/vaginalDischarge-3.webp",
    label: "有血块",
    value: "有血块",
    selectd: false
}, {
    url: "https://miu-bloom.oss-cn-qingdao.aliyuncs.com/chart-icon/vaginalDischarge-4.webp",
    label: "白带增多",
    value: "白带增多",
    selectd: false
}]

export const commonPeriodLengthList = [
    ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
]

export const commonBaseForecastDaysList = [
    ['28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45']
]

export const commonCycleDaysList = [
    ['15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32',
        '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49',
        '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60'
    ]
]

/**
 * 转换颜色
 */
export function conversionColor(value) {
    var findData = commonColorList.find(item => item.value === value);
    if (findData == undefined) {
        return ""
    }
    return findData.label;
}

/**
 * 转换流量
 */
export function conversionFlow(value) {
    var findData = commonFlowList.find(item => item.value === value);
    if (findData == undefined) {
        return ""
    }
    return findData.label;
}

/**
 * 转换腰痛
 */
export function conversionDysmenorrhea(value) {
    var findData = commonDysmenorrheaList.find(item => item.value === value);
    if (findData == undefined) {
        return ""
    }
    return findData.label;
}

/**
 * 转换爱爱
 */
export function conversionHavingSex(value) {
    var findData = commonHavingSexList.find(item => item.value === value);
    if (findData == undefined) {
        return ""
    }
    return findData.label;
}

/**
 * 转换白带
 */
export function conversionLeucorrhea(value) {
    var findData = commonLeucorrheaList.find(item => item.value === value);
    if (findData == undefined) {
        return ""
    }
    return findData.label;
}

/**
 * 转换症状
 */
export function conversionSymptoms(physicalSymptomsList, vaginalDischargeList) {
    const physicalSymptomsMap = new Map(physicalSymptomsList.map(item => [item, item]));
    const vaginalDischargeMap = new Map(vaginalDischargeList.map(item => [item, item]));
    const finalText = []
    var findPhysicalSymptomsData = commonPhysicalSymptomsList.forEach(item => {
        if (physicalSymptomsMap.has(item.value)) {
            finalText.push(item.label)
        }
    });
    var findVaginalDischargeData = commonVaginalDischargeList.forEach(item => {
        if (vaginalDischargeMap.has(item.value)) {
            finalText.push(item.label)
        }
    });
    if (finalText.length > 2) {
        var tempLengthArr = [finalText[0], finalText[1]]
        return tempLengthArr.join("、") + "共" + finalText.length + "种"
    } else {
        return finalText.join("、")
    }
}